import {ILogHelper} from "./ILogHelper";
import {GameFrameworkLogLevel} from "./GameFrameworkLogLevel";

export default class GameFrameworkLog {

    private static s_logHelper:ILogHelper;
    public static SetLogHelper(logHelper:ILogHelper):void{
        this.s_logHelper = logHelper;
    }

    public static Debug(message):void{
        if(this.s_logHelper == null){
            return;
        }
        this.s_logHelper.Log(GameFrameworkLogLevel.Debug, message);
    }

    public static Info(message):void{
        if(this.s_logHelper == null){
            return;
        }
        this.s_logHelper.Log(GameFrameworkLogLevel.Info, message);
    }

    public static Warning(message):void{
        if(this.s_logHelper == null){
            return;
        }
        this.s_logHelper.Log(GameFrameworkLogLevel.Warning, message);
    }

    public static Error(message):void{
        if(this.s_logHelper == null){
            return;
        }
        this.s_logHelper.Log(GameFrameworkLogLevel.Error, message);
    }

    public static Fatal(message):void{
        if(this.s_logHelper == null){
            return;
        }
        this.s_logHelper.Log(GameFrameworkLogLevel.Fatal, message);
    }

}